package P1600;

import java.util.Scanner;

/**
 * @author: zhouyang
 * @descrpition:
 * @time: 2019-10-11 16:22
 */
public class P1618_三连击 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int C = scanner.nextInt();
        scanner.close();
        invoke(A,B,C);
    }

    static boolean flag = false;

    private static void invoke(int a, int b, int c) {
        boolean[] flags = new boolean[9];
        int[] nums = new int[9];
        dfs(0,flags,nums,a,b,c);
        if(!flag) System.out.println("No!!!");
    }

    private static void dfs(int index, boolean[] flags,int[] nums,int a,int b,int c) {
        if(index == 9){
            judge(a,b,c,nums);
            return ;
        }
        for(int i=1;i<=9;++i){
            if(!flags[i-1]){
                flags[i-1] = true;
                nums[index] = i;
                dfs(index+1,flags,nums,a,b,c);
                flags[i-1] = false;
            }
        }
    }

    private static void judge(int a,int b,int c,int[] nums){
        int i = nums[0]*100+nums[1]*10+nums[2];
        int j = nums[3]*100+nums[4]*10+nums[5];
        int k = nums[6]*100+nums[7]*10+nums[8];
        if(i >= j || j >= k) return ;//A<B<C 得到保证
        if(i*b != j*a) return ;
        if(j*c != k*b) return ;
        System.out.printf("%d %d %d\n",i,j,k);
        flag = true;
    }
}
